$PROBLEM 2-comp oral, linear elim

$INPUT ID TIME DV AMT CMT MDV EVID

$DATA nm_001.csv ; IGNORE=

$SUBROUTINES ADVAN4 TRANS4

$PK
CL = THETA(1) * EXP(ETA(1))
V2 = THETA(2) * EXP(ETA(2))
KA = THETA(3) * EXP(ETA(3))
Q  = THETA(4)
V3 = THETA(5) 
S1 = V2

$ERROR
IPRED = F
    Y = IPRED + EPS(1) 
    W = 1
  RES = DV-IPRED
IWRES = RES/W

$THETA
(1, 5, 50) ; CL
(1, 50, 150) ; V
(0.1, 0.5, 2) ; KA

$OMEGA BLOCK(2)
(0.2) ; IIV CL
(0.1) ; CL~V
(0.2) ; IIV V
$OMEGA 
(0.2) ; KA

$SIGMA
(0.2) ; Additive error

$EST METHOD=1 INTER MAXEVAL=2000 NOABORT SIG=3 PRINT=1 POSTHOC
$COV

$TABLE ID TIME DV A1 CMT AMT MDV EVID DLEV BASE IPR
  NOPRINT NOHEADER  

; Xpose
$TABLE ID TIME DV MDV EVID IPRED IWRES FILE=sdtab004
$TABLE CL V KA Q V3 FIRSTONLY FILE=patab001

